
<?php require ('./order.php'); ?>
<?php

session_start();  
//echo $_SESSION['UserName'];
   if(!empty($_POST['U_OrderId'])){ $U_OrderId=$_POST['U_OrderId']; } 
   if(!empty($_POST['U_assignedCuser'])){ $U_assignedCuser=$_POST['U_assignedCuser']; } 

   if(!empty($_POST['U_OStatus'])){ $U_OStatus=$_POST['U_OStatus']; } 
   if(!empty($_POST['U_ClsMemo'])){ $U_ClsMemo=iconv("utf-8", "GB18030", $_POST['U_ClsMemo']); }
   if(!empty($_POST['U_ItemCode'])){ $U_ItemCode=$_POST['U_ItemCode']; } 
   if(isset($U_assignedCuser))  {
    
   $sql= "exec [AX_Replace_Order_Update] '".$U_OrderId."','".$U_assignedCuser."','".$U_ItemCode."','".$_SESSION['UserName']."','U_assignedCuser'";
   $ddf=odbc_exec($sqlconnection,$sql);
   //echo $sql;
  }
   if(isset($U_OStatus))  {
   //odbc_close($sqlconnection);
   $sql1= "exec [AX_Replace_Order_Update] '".$U_OrderId."','".$U_OStatus."','".$U_ItemCode."','".$_SESSION['UserName']."','U_OStatus'";
   $ddf=odbc_exec($sqlconnection,$sql1);
   //echo $sql1;
  }
   if(isset($U_ClsMemo)) {
   //odbc_close($sqlconnection);
   $sql2= "exec [AX_Replace_Order_Update] '".$U_OrderId."','".$U_ClsMemo."','".$U_ItemCode."','".$_SESSION['UserName']."','U_ClsMemo'";
   echo $sql2;
   $ddf=odbc_exec($sqlconnection,$sql2);
   odbc_close($sqlconnection);
   //echo $sql2;
 }
?>
